SA1D = [1    5   32;
    2   10  250;
    3   17  843;
    4   18  1188;
    5   18  1094;
    6   18  1187 ]

SA1S = [1   8   419;
    2   21  2903;
    3   38  2382;
    4   31  2504;  
    5   40  1904;
    6   46  2304]

SA2D = [1    7   312;
    2   54  23719;
    3   109  124651;
    4   175  391645]

SA2S = [1   15   1713;
    2   110  45445;
    3   185  1175521;
    4   120  2160909;  
    5   102  1218462;
    6   100  1148217]

SA3D = [1    15   5198;
    2   43  325127;
    3   86  1566557;
    4   135  4385742]

E = [12 267;
     203  15099;
     Inf Inf];



hold on;
xlabel('Horizon', 'FontSize', 16);
ylabel('Number of Nodes', 'FontSize', 16);
title('Inventory Control', 'FontSize', 16);
set(gca,'XTick',1:1:6);
% axes('FontSize', 16);
plot(1:6, SA1D(:,2), '--r*');
plot(1:6, SA1S(:,2), ':ro');
plot(1:4, SA2D(:,2), '--g*','linewidth',2);
plot(1:6, SA2S(:,2), ':go','linewidth',2);
plot(1:4, SA3D(:,2), '-b*');
plot(1:3, E(:,1), '-.ks');

legend('1 state - 1 action, Deterministic Demand ','1 state - 1 action, Stochastic Demand ', '2 states - 2 actions, Deterministic Demand ','2 states - 2 actions, Stochastic Demand ', '3 states - 3 actions, Deterministic Demand ','1 state-1 action - no pruning', 6, 'FontSize', 16);
hold off;


%%

figure;
semilogy(iter,time(:,1), '--r*');
hold on;
semilogy(iter,time(:,2), '-bo');
semilogy(iter(1:3),E(:,2), '-.ks');
xlabel('Horizon', 'FontSize', 16);
ylabel('Time(ms)', 'FontSize', 16);
title('Inventory Control', 'FontSize', 16);
set(gca,'XTick',1:1:6);
legend('1 state - 1 action', '2 states - 2 actions', '1 state/action - no pruning', 3);
hold off;